import React from 'react';
import {
  BasicLayoutProps
} from '@ant-design/pro-layout';
import { history } from 'umi'

export const layout = (): BasicLayoutProps => {
  return {
    rightContentRender: () => <div>
      <button onClick = { () => {
        localStorage.removeItem('isLogin')
        localStorage.removeItem('role')
        localStorage.removeItem('adminname')
        localStorage.removeItem('token')
        history.push('/login')
      }}
      >退出</button>
    </div>,
    footerRender: () => <footer>底部</footer>
  };
};
